<?php

/**
 * @Author: ddyake
 * @Date:   2020-12-10 00:02:42
 * @Last Modified by:   ddyake
 * @Last Modified time: 2020-12-24 16:52:45
 */
$json = array('status'=>'ok','msg'=>'ok','data'=>'');

$params = $this->params();


$sys = $this->website['class']['unity']->configura('sys');

$json['data'] = array();


$json['data']['recommend'] = $this->website['class']['db']
                   ->table('product')
                   ->field('id','tit','image','price')
                   ->where('sid=? and shopsrecommend=1',$params['sid'])
                   ->limit(6)
                   ->order('id desc')
                   ->select();
$json['data']['types'] = $this->website['class']['db']
                   ->table('type')
                   ->field('id','tit')
                   ->where('upid=?',$sys['productid'])
                   ->order('id asc')
                   ->select();

$json['data']['link'] = $this->website['class']['db']
                   ->table('link')
                   ->field('id','tit','image')
                   ->where('sid=?',$params['sid'])
                   ->order('id desc')
                   ->select();




$this->json_encode_encrypt($json);